<?php

declare(strict_types=1);
/*
 * This file is part of Leonsw.
 *
 * @link     https://leonsw.com
 * @document https://docs.leonsw.com
 * @contact  leonsw.com@gmail.com
 * @license  https://leonsw.com/LICENSE
 */

namespace App\Resource\Activity\Carnival\Audition;

use Illuminate\Http\Resources\Json\JsonResource;

class Resource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'id'=>$this->id,
            'cover_picture' => $this->cover_picture ?: 'https://yoyo-pros.oss-cn-hangzhou.aliyuncs.com/image/1dcd4a78ec13c7e770a74d437a225c44446c7772.jpg',
            'room_name' => $this->room_name,
            'room_id' => $this->room_id,
            'ticket' => $this->ticket,
            'rank' => $this->rank,
            'f_sum_price' => $this->f_sum_price ?: 0,
        ];
    }
}
